Optimal. Leaf size=29 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 29, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3260, 214}
\begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 3260
Rubi steps
\begin {align*} \int \frac {1}{a+b \cosh ^2(x)} \, dx &=\text {Subst}\left (\int \frac {1}{a-(a+b) x^2} \, dx,x,\coth (x)\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 29, normalized size = 1.00 \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a} \tanh (x)}{\sqrt {a+b}}\right )}{\sqrt {a} \sqrt {a+b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(80\) vs.
\(2(21)=42\).
time = 0.45, size = 81, normalized size = 2.79
method | result | size |
default | \(\frac {\ln \left (\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}+\sqrt {a +b}\right )}{2 \sqrt {a}\, \sqrt {a +b}}-\frac {\ln \left (-\sqrt {a +b}\, \left (\tanh ^{2}\left (\frac {x}{2}\right )\right )+2 \tanh \left (\frac {x}{2}\right ) \sqrt {a}-\sqrt {a +b}\right )}{2 \sqrt {a}\, \sqrt {a +b}}\) | \(81\) |
risch | \(\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \sqrt {a^{2}+a b}+b \sqrt {a^{2}+a b}-2 a^{2}-2 a b}{b \sqrt {a^{2}+a b}}\right )}{2 \sqrt {a^{2}+a b}}-\frac {\ln \left ({\mathrm e}^{2 x}+\frac {2 a \sqrt {a^{2}+a b}+b \sqrt {a^{2}+a b}+2 a^{2}+2 a b}{b \sqrt {a^{2}+a b}}\right )}{2 \sqrt {a^{2}+a b}}\) | \(128\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 53 vs.
\(2 (21) = 42\).
time = 0.48, size = 53, normalized size = 1.83 \begin {gather*} -\frac {\log \left (\frac {b e^{\left (-2 \, x\right )} + 2 \, a + b - 2 \, \sqrt {{\left (a + b\right )} a}}{b e^{\left (-2 \, x\right )} + 2 \, a + b + 2 \, \sqrt {{\left (a + b\right )} a}}\right )}{2 \, \sqrt {{\left (a + b\right )} a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 70 vs.
\(2 (21) = 42\).
time = 0.38, size = 293, normalized size = 10.10 \begin {gather*} \left [\frac {\log \left (\frac {b^{2} \cosh \left (x\right )^{4} + 4 \, b^{2} \cosh \left (x\right ) \sinh \left (x\right )^{3} + b^{2} \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b^{2} \cosh \left (x\right )^{2} + 2 \, a b + b^{2}\right )} \sinh \left (x\right )^{2} + 8 \, a^{2} + 8 \, a b + b^{2} + 4 \, {\left (b^{2} \cosh \left (x\right )^{3} + {\left (2 \, a b + b^{2}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) - 4 \, {\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt {a^{2} + a b}}{b \cosh \left (x\right )^{4} + 4 \, b \cosh \left (x\right ) \sinh \left (x\right )^{3} + b \sinh \left (x\right )^{4} + 2 \, {\left (2 \, a + b\right )} \cosh \left (x\right )^{2} + 2 \, {\left (3 \, b \cosh \left (x\right )^{2} + 2 \, a + b\right )} \sinh \left (x\right )^{2} + 4 \, {\left (b \cosh \left (x\right )^{3} + {\left (2 \, a + b\right )} \cosh \left (x\right )\right )} \sinh \left (x\right ) + b}\right )}{2 \, \sqrt {a^{2} + a b}}, \frac {\sqrt {-a^{2} - a b} \arctan \left (\frac {{\left (b \cosh \left (x\right )^{2} + 2 \, b \cosh \left (x\right ) \sinh \left (x\right ) + b \sinh \left (x\right )^{2} + 2 \, a + b\right )} \sqrt {-a^{2} - a b}}{2 \, {\left (a^{2} + a b\right )}}\right )}{a^{2} + a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 10924 vs.
\(2 (27) = 54\).
time = 30.58, size = 10924, normalized size = 376.69 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 39, normalized size = 1.34 \begin {gather*} \frac {\arctan \left (\frac {b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt {-a^{2} - a b}}\right )}{\sqrt {-a^{2} - a b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.35, size = 267, normalized size = 9.21 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {b^2\,{\mathrm {e}}^{2\,x}\,{\left (-a^2-b\,a\right )}^{3/2}\,\left (\frac {4\,\left (4\,a+2\,b\right )\,\left (8\,a^3+12\,a^2\,b+4\,a\,b^2\right )}{b^5\,{\left (-a^2-b\,a\right )}^{3/2}\,\sqrt {-a\,\left (a+b\right )}}+\frac {2\,\left (8\,a^2+8\,a\,b+b^2\right )\,\left (8\,a^2\,\sqrt {-a^2-b\,a}+b^2\,\sqrt {-a^2-b\,a}+8\,a\,b\,\sqrt {-a^2-b\,a}\right )}{a\,b^5\,\left (a+b\right )\,{\left (-a^2-b\,a\right )}^{3/2}}\right )}{4}+\frac {\left (2\,a^2\,b+2\,a\,b^2\right )\,\left (4\,a+2\,b\right )}{b^3\,\sqrt {-a\,\left (a+b\right )}}+\frac {\left (b^2\,\sqrt {-a^2-b\,a}+2\,a\,b\,\sqrt {-a^2-b\,a}\right )\,\left (8\,a^2+8\,a\,b+b^2\right )}{2\,a\,b^3\,\left (a+b\right )}\right )}{\sqrt {-a^2-b\,a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________